package exceptions;

public class ParseInt {

	public void run(){
		String foo = "LAAAAA";
		int i = 0;
		try{
			i = Integer.parseInt(foo);
			System.out.println("1 SURVIVED");
		}catch(NumberFormatException e){
			System.out.println("CAUGHT");
		}
		System.out.println("OUTSIDE");
		System.out.println(i);
		
		String poo = "-69";
		i = 0;
		try{
			i = Integer.parseInt(poo);
			System.out.println("2 SURVIVED");
		}catch(NumberFormatException e){
			System.out.println("CAUGHT");
		}
		System.out.println("OUTSIDE");
		System.out.println(i);
		
	}
	public static void main(String[] args) {
		ParseInt pi = new ParseInt();
		pi.run();
	}

}
